/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.date.DateUtil
 *  cn.hutool.core.util.ObjectUtil
 *  cn.hutool.core.util.StrUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.collections.FXCollections
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.ButtonType
 *  javafx.scene.control.ChoiceBox
 *  javafx.scene.control.RadioButton
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.TextField
 *  javafx.scene.layout.VBox
 *  javafx.stage.Modality
 *  javafx.util.StringConverter
 *  org.springframework.beans.factory.annotation.Autowired
 */
package com.gys.controller.physicalCount;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.gys.GysApplication;
import com.gys.common.business.LocalSettingUtil;
import com.gys.common.business.PhysicalCountUtil;
import com.gys.common.business.ProductLocationUtil;
import com.gys.common.business.ProductSortSettingUtil;
import com.gys.common.data.HttpJson;
import com.gys.controller.BaseController;
import com.gys.controller.physicalCount.AddPhysicalController;
import com.gys.controller.physicalCount.AddPhysicalDiffController;
import com.gys.data.LocalSetting.LocalSettingOutData;
import com.gys.data.physicalCount.GetPhysicalCountInData;
import com.gys.data.physicalCount.GetPhysicalCountOutData;
import com.gys.data.productLocation.GetProductLocationInData;
import com.gys.data.productLocation.GetProductLocationOutData;
import com.gys.data.productSortSetting.GetProductSortOutData;
import com.gys.view.physicalCount.AddPhysicalDiffView;
import com.gys.view.physicalCount.AddPhysicalView;
import de.felixroske.jfxsupport.FXMLController;
import java.net.URL;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.ResourceBundle;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.util.StringConverter;
import org.springframework.beans.factory.annotation.Autowired;

@FXMLController
public class PhysicalCountController
extends BaseController
implements Initializable {
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private VBox vBox;
    @FXML
    private RadioButton radioAll;
    @FXML
    private TextField allGspcDate;
    @FXML
    private Button allPhysicalAdd;
    @FXML
    private Button allPhysicalApprove;
    @FXML
    private RadioButton radioSingle;
    @FXML
    private TextField singleGspcDate;
    @FXML
    private Button singlePhysicalAdd;
    @FXML
    private Button singlePhysicalApprove;
    @FXML
    private TextField gspcTime;
    @FXML
    private TextField gspcProId;
    @FXML
    private RadioButton radioProId;
    @FXML
    private RadioButton radioProType;
    @FXML
    private RadioButton radioProLoaction;
    @FXML
    private ChoiceBox<GetProductSortOutData> gspgId;
    @FXML
    private ChoiceBox<GetProductLocationOutData> gsplArea;
    @FXML
    private ChoiceBox<GetProductLocationOutData> gsplGroup;
    @FXML
    private ChoiceBox<GetProductLocationOutData> gsplShelf;
    @FXML
    private ChoiceBox<GetProductLocationOutData> gsplStorey;
    @FXML
    private ChoiceBox<GetProductLocationOutData> gsplSeat;
    @FXML
    private Button saveDiffButton;
    @FXML
    private Button updateDiffButton;
    @FXML
    private Button approveDiffButton;
    @Autowired
    private AddPhysicalController addPhysicalController;
    @Autowired
    private AddPhysicalDiffController addPhysicalDiffController;
    private boolean physicalView = false;
    private boolean physicalDiffView = false;

    public void initialize(URL location, ResourceBundle resources) {
        this.scrollPane.setPrefWidth(this.getContentWidth());
        this.scrollPane.setPrefHeight(this.getContentHeight());
        this.vBox.setPrefWidth(this.getContentWidth());
        this.vBox.setPrefHeight(this.getContentHeight());
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        HashMap<String, Object> param = new HashMap<String, Object>();
        HttpJson rsp = ProductSortSettingUtil.selectProGroupByClient(param);
        if (rsp.isSuccess()) {
            List proGroup = JSON.parseArray((String)rsp.getMsg(), GetProductSortOutData.class);
            this.gspgId.setItems(FXCollections.observableArrayList((Collection)proGroup));
            this.gspgId.converterProperty().set(new StringConverter<GetProductSortOutData>(){

                public String toString(GetProductSortOutData object) {
                    return object.getGspgNameSort();
                }

                public GetProductSortOutData fromString(String string) {
                    return null;
                }
            });
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
        GetProductLocationInData inData = new GetProductLocationInData();
        rsp = ProductLocationUtil.selectLocationDrop(inData);
        if (rsp.isSuccess()) {
            GetProductLocationOutData outData = (GetProductLocationOutData)JSON.parseObject((String)rsp.getMsg(), GetProductLocationOutData.class);
            List<GetProductLocationOutData> areaList = outData.getAreaList();
            this.gsplArea.setItems(FXCollections.observableArrayList(areaList));
            this.gsplArea.converterProperty().set(new StringConverter<GetProductLocationOutData>(){

                public String toString(GetProductLocationOutData object) {
                    return object.getName();
                }

                public GetProductLocationOutData fromString(String string) {
                    return null;
                }
            });
            List<GetProductLocationOutData> groupList = outData.getGroupList();
            this.gsplGroup.setItems(FXCollections.observableArrayList(groupList));
            this.gsplGroup.converterProperty().set(new StringConverter<GetProductLocationOutData>(){

                public String toString(GetProductLocationOutData object) {
                    return object.getName();
                }

                public GetProductLocationOutData fromString(String string) {
                    return null;
                }
            });
            List<GetProductLocationOutData> shelfList = outData.getShelfList();
            this.gsplShelf.setItems(FXCollections.observableArrayList(shelfList));
            this.gsplShelf.converterProperty().set(new StringConverter<GetProductLocationOutData>(){

                public String toString(GetProductLocationOutData object) {
                    return object.getName();
                }

                public GetProductLocationOutData fromString(String string) {
                    return null;
                }
            });
            List<GetProductLocationOutData> storeyList = outData.getStoreyList();
            this.gsplStorey.setItems(FXCollections.observableArrayList(storeyList));
            this.gsplStorey.converterProperty().set(new StringConverter<GetProductLocationOutData>(){

                public String toString(GetProductLocationOutData object) {
                    return object.getName();
                }

                public GetProductLocationOutData fromString(String string) {
                    return null;
                }
            });
            List<GetProductLocationOutData> seatList = outData.getSeatList();
            this.gsplSeat.setItems(FXCollections.observableArrayList(seatList));
            this.gsplSeat.converterProperty().set(new StringConverter<GetProductLocationOutData>(){

                public String toString(GetProductLocationOutData object) {
                    return object.getName();
                }

                public GetProductLocationOutData fromString(String string) {
                    return null;
                }
            });
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    private void radioShowAll() {
        this.radioSingle.setSelected(false);
        this.singleGspcDate.setText("");
        this.singlePhysicalAdd.setDisable(true);
        this.singlePhysicalApprove.setDisable(true);
        this.gspcTime.setText("");
        this.saveDiffButton.setDisable(true);
        this.updateDiffButton.setDisable(true);
        this.approveDiffButton.setDisable(true);
        if (this.radioAll.isSelected()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
            HashMap<String, Object> param = new HashMap<String, Object>();
            HttpJson rsp = LocalSettingUtil.selectOne(param);
            String gspcDate = "";
            if (rsp.isSuccess()) {
                LocalSettingOutData outData = (LocalSettingOutData)JSON.parseObject((String)rsp.getMsg(), LocalSettingOutData.class);
                if (ObjectUtil.isNotNull(outData)) {
                    gspcDate = outData.getGsstPdStartDate();
                }
            } else {
                alert.setContentText(rsp.getMsg());
                alert.showAndWait();
                return;
            }
            if (StrUtil.isBlank((CharSequence)gspcDate)) {
                alert.setContentText("\u95e8\u5e97\u672a\u8bbe\u7f6e\u5168\u573a\u76d8\u70b9\u5f00\u59cb\u65e5\u671f");
                alert.showAndWait();
                return;
            }
            this.allGspcDate.setText(gspcDate);
            GetPhysicalCountInData inData = new GetPhysicalCountInData();
            inData.setGspcDate(gspcDate);
            inData.setGspcType("1");
            rsp = PhysicalCountUtil.selectPhysicalOne(inData);
            if (rsp.isSuccess()) {
                GetPhysicalCountOutData outData = (GetPhysicalCountOutData)JSON.parseObject((String)rsp.getMsg(), GetPhysicalCountOutData.class);
                if ("0".equals(outData.getStatus())) {
                    this.allPhysicalAdd.setDisable(false);
                    this.allPhysicalApprove.setDisable(true);
                    this.physicalView = false;
                    return;
                }
                if ("1".equals(outData.getStatus())) {
                    this.allPhysicalAdd.setDisable(false);
                    this.allPhysicalApprove.setDisable(false);
                    this.physicalView = false;
                    return;
                }
                if ("2".equals(outData.getStatus())) {
                    this.allPhysicalAdd.setDisable(false);
                    this.allPhysicalApprove.setDisable(true);
                    this.physicalView = true;
                    this.saveDiffButton.setDisable(false);
                    this.updateDiffButton.setDisable(true);
                }
                if ("3".equals(outData.getStatus()) || "4".equals(outData.getStatus())) {
                    this.saveDiffButton.setDisable(true);
                    this.updateDiffButton.setDisable(false);
                }
                if ("3".equals(outData.getStatus())) {
                    this.physicalDiffView = false;
                    this.approveDiffButton.setDisable(false);
                }
                if ("4".equals(outData.getStatus())) {
                    this.physicalDiffView = true;
                }
            } else {
                alert.setContentText(rsp.getMsg());
                alert.showAndWait();
            }
        } else {
            this.allGspcDate.setText("");
            this.allPhysicalAdd.setDisable(true);
            this.allPhysicalApprove.setDisable(true);
        }
    }

    @FXML
    private void radioShowSingle() {
        this.radioAll.setSelected(false);
        this.allGspcDate.setText("");
        this.allPhysicalAdd.setDisable(true);
        this.allPhysicalApprove.setDisable(true);
        this.saveDiffButton.setDisable(true);
        this.updateDiffButton.setDisable(true);
        this.approveDiffButton.setDisable(true);
        if (this.radioSingle.isSelected()) {
            String gspcDate = DateUtil.format((Date)new Date(), (String)"yyyyMMdd");
            this.singleGspcDate.setText(gspcDate);
            this.gspcTime.setText(DateUtil.format((Date)new Date(), (String)"HHmmss"));
            GetPhysicalCountInData inData = new GetPhysicalCountInData();
            inData.setGspcDate(gspcDate);
            inData.setGspcType("2");
            HttpJson rsp = PhysicalCountUtil.selectPhysicalOne(inData);
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
            if (rsp.isSuccess()) {
                GetPhysicalCountOutData outData = (GetPhysicalCountOutData)JSON.parseObject((String)rsp.getMsg(), GetPhysicalCountOutData.class);
                if ("0".equals(outData.getStatus())) {
                    this.singlePhysicalAdd.setDisable(false);
                    this.singlePhysicalApprove.setDisable(true);
                    this.physicalView = false;
                    return;
                }
                if ("1".equals(outData.getStatus())) {
                    this.singlePhysicalAdd.setDisable(false);
                    this.singlePhysicalApprove.setDisable(false);
                    this.physicalView = false;
                    return;
                }
                if ("2".equals(outData.getStatus())) {
                    this.singlePhysicalAdd.setDisable(false);
                    this.singlePhysicalApprove.setDisable(true);
                    this.physicalView = true;
                    this.saveDiffButton.setDisable(false);
                    this.updateDiffButton.setDisable(true);
                }
                if ("3".equals(outData.getStatus()) || "4".equals(outData.getStatus())) {
                    this.saveDiffButton.setDisable(true);
                    this.updateDiffButton.setDisable(false);
                }
                if ("3".equals(outData.getStatus())) {
                    this.approveDiffButton.setDisable(false);
                    this.physicalDiffView = false;
                }
                if ("4".equals(outData.getStatus())) {
                    this.physicalDiffView = true;
                }
            } else {
                alert.setContentText(rsp.getMsg());
                alert.showAndWait();
            }
        } else {
            this.singleGspcDate.setText("");
            this.singlePhysicalAdd.setDisable(true);
            this.singlePhysicalApprove.setDisable(true);
            this.gspcTime.setText("");
        }
    }

    @FXML
    private void radioShowProId() {
        this.radioProType.setSelected(false);
        this.radioProLoaction.setSelected(false);
    }

    @FXML
    private void radioShowProType() {
        this.radioProId.setSelected(false);
        this.radioProLoaction.setSelected(false);
    }

    @FXML
    private void radioShowProLoaction() {
        this.radioProType.setSelected(false);
        this.radioProId.setSelected(false);
    }

    @FXML
    private void showPhysicalAdd() {
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        if (this.radioSingle.isSelected()) {
            if (!(this.radioProId.isSelected() || this.radioProType.isSelected() || this.radioProLoaction.isSelected())) {
                alert.setContentText("\u8bf7\u9009\u62e9\u6309\u5546\u54c1\u7f16\u7801\u3001\u5546\u54c1\u5206\u7c7b\u6216\u5546\u54c1\u8d27\u4f4d\u4e2d\u7684\u4e00\u79cd");
                alert.showAndWait();
                return;
            }
            if (this.radioProId.isSelected() && StrUtil.isBlank((CharSequence)this.gspcProId.getText().trim())) {
                alert.setContentText("\u8bf7\u586b\u5199\u5546\u54c1\u7f16\u7801");
                alert.showAndWait();
                return;
            }
            if (this.radioProType.isSelected() && ObjectUtil.isNull(this.gspgId.getValue())) {
                alert.setContentText("\u8bf7\u9009\u62e9\u5546\u54c1\u5206\u7c7b");
                alert.showAndWait();
                return;
            }
            if (this.radioProLoaction.isSelected() && ObjectUtil.isNull(this.gsplArea.getValue()) && ObjectUtil.isNull(this.gsplGroup.getValue()) && ObjectUtil.isNull(this.gsplShelf.getValue()) && ObjectUtil.isNull(this.gsplStorey.getValue()) && ObjectUtil.isNull(this.gsplSeat.getValue())) {
                alert.setContentText("\u8bf7\u9009\u62e9\u5546\u54c1\u8d27\u4f4d");
                alert.showAndWait();
                return;
            }
        }
        this.addPhysicalController.init();
        GysApplication.showView(AddPhysicalView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    @FXML
    private void approvePhysical() {
        Alert alert = this.createAlert(Alert.AlertType.CONFIRMATION, "\u5ba1\u6279\u5f53\u524d\u76d8\u70b9\uff1f", null);
        Optional result = alert.showAndWait();
        if (result.get() == ButtonType.OK) {
            HttpJson rsp;
            GetPhysicalCountInData inData = new GetPhysicalCountInData();
            if (this.radioAll.isSelected()) {
                inData.setGspcDate(this.allGspcDate.getText());
                inData.setGspcType("1");
            }
            if (this.radioSingle.isSelected()) {
                inData.setGspcDate(this.singleGspcDate.getText());
                inData.setGspcType("2");
            }
            if ((rsp = PhysicalCountUtil.approvePhysical(inData)).isSuccess()) {
                if (this.radioAll.isSelected()) {
                    this.allPhysicalApprove.setDisable(true);
                }
                if (this.radioSingle.isSelected()) {
                    this.singlePhysicalApprove.setDisable(true);
                }
                this.saveDiffButton.setDisable(false);
                this.physicalView = true;
            } else {
                Alert alertTip = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
                alertTip.setContentText(rsp.getMsg());
                alertTip.showAndWait();
            }
        }
    }

    @FXML
    private void saveDiff() {
        HttpJson rsp;
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        GetPhysicalCountInData inData = new GetPhysicalCountInData();
        if (this.radioAll.isSelected()) {
            inData.setGspcDate(this.allGspcDate.getText());
            inData.setGspcType("1");
        }
        if (this.radioSingle.isSelected()) {
            inData.setGspcDate(this.singleGspcDate.getText());
            inData.setGspcType("2");
        }
        if ((rsp = PhysicalCountUtil.savePhysicalDiff(inData)).isSuccess()) {
            this.saveDiffButton.setDisable(true);
            this.updateDiffButton.setDisable(false);
            this.approveDiffButton.setDisable(false);
            this.physicalDiffView = false;
            alert.setContentText("\u751f\u6210\u5dee\u5f02\u6210\u529f");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    @FXML
    private void showPhysicalDiff() {
        this.addPhysicalDiffController.init();
        GysApplication.showView(AddPhysicalDiffView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    @FXML
    private void approveDiff() {
        HttpJson rsp;
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", null);
        GetPhysicalCountInData inData = new GetPhysicalCountInData();
        if (this.radioAll.isSelected()) {
            inData.setGspcDate(this.allGspcDate.getText());
            inData.setGspcType("1");
        }
        if (this.radioSingle.isSelected()) {
            inData.setGspcDate(this.singleGspcDate.getText());
            inData.setGspcType("2");
        }
        if ((rsp = PhysicalCountUtil.approvePhysicalDiff(inData)).isSuccess()) {
            this.approveDiffButton.setDisable(true);
            this.physicalDiffView = true;
            alert.setContentText("\u5ba1\u6838\u5dee\u5f02\u6210\u529f");
            alert.showAndWait();
        } else {
            alert.setContentText(rsp.getMsg());
            alert.showAndWait();
        }
    }

    public ScrollPane getScrollPane() {
        return this.scrollPane;
    }

    public VBox getVBox() {
        return this.vBox;
    }

    public RadioButton getRadioAll() {
        return this.radioAll;
    }

    public TextField getAllGspcDate() {
        return this.allGspcDate;
    }

    public Button getAllPhysicalAdd() {
        return this.allPhysicalAdd;
    }

    public Button getAllPhysicalApprove() {
        return this.allPhysicalApprove;
    }

    public RadioButton getRadioSingle() {
        return this.radioSingle;
    }

    public TextField getSingleGspcDate() {
        return this.singleGspcDate;
    }

    public Button getSinglePhysicalAdd() {
        return this.singlePhysicalAdd;
    }

    public Button getSinglePhysicalApprove() {
        return this.singlePhysicalApprove;
    }

    public TextField getGspcTime() {
        return this.gspcTime;
    }

    public TextField getGspcProId() {
        return this.gspcProId;
    }

    public RadioButton getRadioProId() {
        return this.radioProId;
    }

    public RadioButton getRadioProType() {
        return this.radioProType;
    }

    public RadioButton getRadioProLoaction() {
        return this.radioProLoaction;
    }

    public ChoiceBox<GetProductSortOutData> getGspgId() {
        return this.gspgId;
    }

    public ChoiceBox<GetProductLocationOutData> getGsplArea() {
        return this.gsplArea;
    }

    public ChoiceBox<GetProductLocationOutData> getGsplGroup() {
        return this.gsplGroup;
    }

    public ChoiceBox<GetProductLocationOutData> getGsplShelf() {
        return this.gsplShelf;
    }

    public ChoiceBox<GetProductLocationOutData> getGsplStorey() {
        return this.gsplStorey;
    }

    public ChoiceBox<GetProductLocationOutData> getGsplSeat() {
        return this.gsplSeat;
    }

    public Button getSaveDiffButton() {
        return this.saveDiffButton;
    }

    public Button getUpdateDiffButton() {
        return this.updateDiffButton;
    }

    public Button getApproveDiffButton() {
        return this.approveDiffButton;
    }

    public AddPhysicalController getAddPhysicalController() {
        return this.addPhysicalController;
    }

    public AddPhysicalDiffController getAddPhysicalDiffController() {
        return this.addPhysicalDiffController;
    }

    public boolean isPhysicalView() {
        return this.physicalView;
    }

    public boolean isPhysicalDiffView() {
        return this.physicalDiffView;
    }

    public void setScrollPane(ScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public void setVBox(VBox vBox) {
        this.vBox = vBox;
    }

    public void setRadioAll(RadioButton radioAll) {
        this.radioAll = radioAll;
    }

    public void setAllGspcDate(TextField allGspcDate) {
        this.allGspcDate = allGspcDate;
    }

    public void setAllPhysicalAdd(Button allPhysicalAdd) {
        this.allPhysicalAdd = allPhysicalAdd;
    }

    public void setAllPhysicalApprove(Button allPhysicalApprove) {
        this.allPhysicalApprove = allPhysicalApprove;
    }

    public void setRadioSingle(RadioButton radioSingle) {
        this.radioSingle = radioSingle;
    }

    public void setSingleGspcDate(TextField singleGspcDate) {
        this.singleGspcDate = singleGspcDate;
    }

    public void setSinglePhysicalAdd(Button singlePhysicalAdd) {
        this.singlePhysicalAdd = singlePhysicalAdd;
    }

    public void setSinglePhysicalApprove(Button singlePhysicalApprove) {
        this.singlePhysicalApprove = singlePhysicalApprove;
    }

    public void setGspcTime(TextField gspcTime) {
        this.gspcTime = gspcTime;
    }

    public void setGspcProId(TextField gspcProId) {
        this.gspcProId = gspcProId;
    }

    public void setRadioProId(RadioButton radioProId) {
        this.radioProId = radioProId;
    }

    public void setRadioProType(RadioButton radioProType) {
        this.radioProType = radioProType;
    }

    public void setRadioProLoaction(RadioButton radioProLoaction) {
        this.radioProLoaction = radioProLoaction;
    }

    public void setGspgId(ChoiceBox<GetProductSortOutData> gspgId) {
        this.gspgId = gspgId;
    }

    public void setGsplArea(ChoiceBox<GetProductLocationOutData> gsplArea) {
        this.gsplArea = gsplArea;
    }

    public void setGsplGroup(ChoiceBox<GetProductLocationOutData> gsplGroup) {
        this.gsplGroup = gsplGroup;
    }

    public void setGsplShelf(ChoiceBox<GetProductLocationOutData> gsplShelf) {
        this.gsplShelf = gsplShelf;
    }

    public void setGsplStorey(ChoiceBox<GetProductLocationOutData> gsplStorey) {
        this.gsplStorey = gsplStorey;
    }

    public void setGsplSeat(ChoiceBox<GetProductLocationOutData> gsplSeat) {
        this.gsplSeat = gsplSeat;
    }

    public void setSaveDiffButton(Button saveDiffButton) {
        this.saveDiffButton = saveDiffButton;
    }

    public void setUpdateDiffButton(Button updateDiffButton) {
        this.updateDiffButton = updateDiffButton;
    }

    public void setApproveDiffButton(Button approveDiffButton) {
        this.approveDiffButton = approveDiffButton;
    }

    public void setAddPhysicalController(AddPhysicalController addPhysicalController) {
        this.addPhysicalController = addPhysicalController;
    }

    public void setAddPhysicalDiffController(AddPhysicalDiffController addPhysicalDiffController) {
        this.addPhysicalDiffController = addPhysicalDiffController;
    }

    public void setPhysicalView(boolean physicalView) {
        this.physicalView = physicalView;
    }

    public void setPhysicalDiffView(boolean physicalDiffView) {
        this.physicalDiffView = physicalDiffView;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof PhysicalCountController)) {
            return false;
        }
        PhysicalCountController other = (PhysicalCountController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        ScrollPane this$scrollPane = this.getScrollPane();
        ScrollPane other$scrollPane = other.getScrollPane();
        if (this$scrollPane == null ? other$scrollPane != null : !this$scrollPane.equals(other$scrollPane)) {
            return false;
        }
        VBox this$vBox = this.getVBox();
        VBox other$vBox = other.getVBox();
        if (this$vBox == null ? other$vBox != null : !this$vBox.equals(other$vBox)) {
            return false;
        }
        RadioButton this$radioAll = this.getRadioAll();
        RadioButton other$radioAll = other.getRadioAll();
        if (this$radioAll == null ? other$radioAll != null : !this$radioAll.equals(other$radioAll)) {
            return false;
        }
        TextField this$allGspcDate = this.getAllGspcDate();
        TextField other$allGspcDate = other.getAllGspcDate();
        if (this$allGspcDate == null ? other$allGspcDate != null : !this$allGspcDate.equals(other$allGspcDate)) {
            return false;
        }
        Button this$allPhysicalAdd = this.getAllPhysicalAdd();
        Button other$allPhysicalAdd = other.getAllPhysicalAdd();
        if (this$allPhysicalAdd == null ? other$allPhysicalAdd != null : !this$allPhysicalAdd.equals(other$allPhysicalAdd)) {
            return false;
        }
        Button this$allPhysicalApprove = this.getAllPhysicalApprove();
        Button other$allPhysicalApprove = other.getAllPhysicalApprove();
        if (this$allPhysicalApprove == null ? other$allPhysicalApprove != null : !this$allPhysicalApprove.equals(other$allPhysicalApprove)) {
            return false;
        }
        RadioButton this$radioSingle = this.getRadioSingle();
        RadioButton other$radioSingle = other.getRadioSingle();
        if (this$radioSingle == null ? other$radioSingle != null : !this$radioSingle.equals(other$radioSingle)) {
            return false;
        }
        TextField this$singleGspcDate = this.getSingleGspcDate();
        TextField other$singleGspcDate = other.getSingleGspcDate();
        if (this$singleGspcDate == null ? other$singleGspcDate != null : !this$singleGspcDate.equals(other$singleGspcDate)) {
            return false;
        }
        Button this$singlePhysicalAdd = this.getSinglePhysicalAdd();
        Button other$singlePhysicalAdd = other.getSinglePhysicalAdd();
        if (this$singlePhysicalAdd == null ? other$singlePhysicalAdd != null : !this$singlePhysicalAdd.equals(other$singlePhysicalAdd)) {
            return false;
        }
        Button this$singlePhysicalApprove = this.getSinglePhysicalApprove();
        Button other$singlePhysicalApprove = other.getSinglePhysicalApprove();
        if (this$singlePhysicalApprove == null ? other$singlePhysicalApprove != null : !this$singlePhysicalApprove.equals(other$singlePhysicalApprove)) {
            return false;
        }
        TextField this$gspcTime = this.getGspcTime();
        TextField other$gspcTime = other.getGspcTime();
        if (this$gspcTime == null ? other$gspcTime != null : !this$gspcTime.equals(other$gspcTime)) {
            return false;
        }
        TextField this$gspcProId = this.getGspcProId();
        TextField other$gspcProId = other.getGspcProId();
        if (this$gspcProId == null ? other$gspcProId != null : !this$gspcProId.equals(other$gspcProId)) {
            return false;
        }
        RadioButton this$radioProId = this.getRadioProId();
        RadioButton other$radioProId = other.getRadioProId();
        if (this$radioProId == null ? other$radioProId != null : !this$radioProId.equals(other$radioProId)) {
            return false;
        }
        RadioButton this$radioProType = this.getRadioProType();
        RadioButton other$radioProType = other.getRadioProType();
        if (this$radioProType == null ? other$radioProType != null : !this$radioProType.equals(other$radioProType)) {
            return false;
        }
        RadioButton this$radioProLoaction = this.getRadioProLoaction();
        RadioButton other$radioProLoaction = other.getRadioProLoaction();
        if (this$radioProLoaction == null ? other$radioProLoaction != null : !this$radioProLoaction.equals(other$radioProLoaction)) {
            return false;
        }
        ChoiceBox<GetProductSortOutData> this$gspgId = this.getGspgId();
        ChoiceBox<GetProductSortOutData> other$gspgId = other.getGspgId();
        if (this$gspgId == null ? other$gspgId != null : !this$gspgId.equals(other$gspgId)) {
            return false;
        }
        ChoiceBox<GetProductLocationOutData> this$gsplArea = this.getGsplArea();
        ChoiceBox<GetProductLocationOutData> other$gsplArea = other.getGsplArea();
        if (this$gsplArea == null ? other$gsplArea != null : !this$gsplArea.equals(other$gsplArea)) {
            return false;
        }
        ChoiceBox<GetProductLocationOutData> this$gsplGroup = this.getGsplGroup();
        ChoiceBox<GetProductLocationOutData> other$gsplGroup = other.getGsplGroup();
        if (this$gsplGroup == null ? other$gsplGroup != null : !this$gsplGroup.equals(other$gsplGroup)) {
            return false;
        }
        ChoiceBox<GetProductLocationOutData> this$gsplShelf = this.getGsplShelf();
        ChoiceBox<GetProductLocationOutData> other$gsplShelf = other.getGsplShelf();
        if (this$gsplShelf == null ? other$gsplShelf != null : !this$gsplShelf.equals(other$gsplShelf)) {
            return false;
        }
        ChoiceBox<GetProductLocationOutData> this$gsplStorey = this.getGsplStorey();
        ChoiceBox<GetProductLocationOutData> other$gsplStorey = other.getGsplStorey();
        if (this$gsplStorey == null ? other$gsplStorey != null : !this$gsplStorey.equals(other$gsplStorey)) {
            return false;
        }
        ChoiceBox<GetProductLocationOutData> this$gsplSeat = this.getGsplSeat();
        ChoiceBox<GetProductLocationOutData> other$gsplSeat = other.getGsplSeat();
        if (this$gsplSeat == null ? other$gsplSeat != null : !this$gsplSeat.equals(other$gsplSeat)) {
            return false;
        }
        Button this$saveDiffButton = this.getSaveDiffButton();
        Button other$saveDiffButton = other.getSaveDiffButton();
        if (this$saveDiffButton == null ? other$saveDiffButton != null : !this$saveDiffButton.equals(other$saveDiffButton)) {
            return false;
        }
        Button this$updateDiffButton = this.getUpdateDiffButton();
        Button other$updateDiffButton = other.getUpdateDiffButton();
        if (this$updateDiffButton == null ? other$updateDiffButton != null : !this$updateDiffButton.equals(other$updateDiffButton)) {
            return false;
        }
        Button this$approveDiffButton = this.getApproveDiffButton();
        Button other$approveDiffButton = other.getApproveDiffButton();
        if (this$approveDiffButton == null ? other$approveDiffButton != null : !this$approveDiffButton.equals(other$approveDiffButton)) {
            return false;
        }
        AddPhysicalController this$addPhysicalController = this.getAddPhysicalController();
        AddPhysicalController other$addPhysicalController = other.getAddPhysicalController();
        if (this$addPhysicalController == null ? other$addPhysicalController != null : !(this$addPhysicalController).equals(other$addPhysicalController)) {
            return false;
        }
        AddPhysicalDiffController this$addPhysicalDiffController = this.getAddPhysicalDiffController();
        AddPhysicalDiffController other$addPhysicalDiffController = other.getAddPhysicalDiffController();
        if (this$addPhysicalDiffController == null ? other$addPhysicalDiffController != null : !(this$addPhysicalDiffController).equals(other$addPhysicalDiffController)) {
            return false;
        }
        if (this.isPhysicalView() != other.isPhysicalView()) {
            return false;
        }
        return this.isPhysicalDiffView() == other.isPhysicalDiffView();
    }

    protected boolean canEqual(Object other) {
        return other instanceof PhysicalCountController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        ScrollPane $scrollPane = this.getScrollPane();
        result = result * 59 + ($scrollPane == null ? 43 : $scrollPane.hashCode());
        VBox $vBox = this.getVBox();
        result = result * 59 + ($vBox == null ? 43 : $vBox.hashCode());
        RadioButton $radioAll = this.getRadioAll();
        result = result * 59 + ($radioAll == null ? 43 : $radioAll.hashCode());
        TextField $allGspcDate = this.getAllGspcDate();
        result = result * 59 + ($allGspcDate == null ? 43 : $allGspcDate.hashCode());
        Button $allPhysicalAdd = this.getAllPhysicalAdd();
        result = result * 59 + ($allPhysicalAdd == null ? 43 : $allPhysicalAdd.hashCode());
        Button $allPhysicalApprove = this.getAllPhysicalApprove();
        result = result * 59 + ($allPhysicalApprove == null ? 43 : $allPhysicalApprove.hashCode());
        RadioButton $radioSingle = this.getRadioSingle();
        result = result * 59 + ($radioSingle == null ? 43 : $radioSingle.hashCode());
        TextField $singleGspcDate = this.getSingleGspcDate();
        result = result * 59 + ($singleGspcDate == null ? 43 : $singleGspcDate.hashCode());
        Button $singlePhysicalAdd = this.getSinglePhysicalAdd();
        result = result * 59 + ($singlePhysicalAdd == null ? 43 : $singlePhysicalAdd.hashCode());
        Button $singlePhysicalApprove = this.getSinglePhysicalApprove();
        result = result * 59 + ($singlePhysicalApprove == null ? 43 : $singlePhysicalApprove.hashCode());
        TextField $gspcTime = this.getGspcTime();
        result = result * 59 + ($gspcTime == null ? 43 : $gspcTime.hashCode());
        TextField $gspcProId = this.getGspcProId();
        result = result * 59 + ($gspcProId == null ? 43 : $gspcProId.hashCode());
        RadioButton $radioProId = this.getRadioProId();
        result = result * 59 + ($radioProId == null ? 43 : $radioProId.hashCode());
        RadioButton $radioProType = this.getRadioProType();
        result = result * 59 + ($radioProType == null ? 43 : $radioProType.hashCode());
        RadioButton $radioProLoaction = this.getRadioProLoaction();
        result = result * 59 + ($radioProLoaction == null ? 43 : $radioProLoaction.hashCode());
        ChoiceBox<GetProductSortOutData> $gspgId = this.getGspgId();
        result = result * 59 + ($gspgId == null ? 43 : $gspgId.hashCode());
        ChoiceBox<GetProductLocationOutData> $gsplArea = this.getGsplArea();
        result = result * 59 + ($gsplArea == null ? 43 : $gsplArea.hashCode());
        ChoiceBox<GetProductLocationOutData> $gsplGroup = this.getGsplGroup();
        result = result * 59 + ($gsplGroup == null ? 43 : $gsplGroup.hashCode());
        ChoiceBox<GetProductLocationOutData> $gsplShelf = this.getGsplShelf();
        result = result * 59 + ($gsplShelf == null ? 43 : $gsplShelf.hashCode());
        ChoiceBox<GetProductLocationOutData> $gsplStorey = this.getGsplStorey();
        result = result * 59 + ($gsplStorey == null ? 43 : $gsplStorey.hashCode());
        ChoiceBox<GetProductLocationOutData> $gsplSeat = this.getGsplSeat();
        result = result * 59 + ($gsplSeat == null ? 43 : $gsplSeat.hashCode());
        Button $saveDiffButton = this.getSaveDiffButton();
        result = result * 59 + ($saveDiffButton == null ? 43 : $saveDiffButton.hashCode());
        Button $updateDiffButton = this.getUpdateDiffButton();
        result = result * 59 + ($updateDiffButton == null ? 43 : $updateDiffButton.hashCode());
        Button $approveDiffButton = this.getApproveDiffButton();
        result = result * 59 + ($approveDiffButton == null ? 43 : $approveDiffButton.hashCode());
        AddPhysicalController $addPhysicalController = this.getAddPhysicalController();
        result = result * 59 + ($addPhysicalController == null ? 43 : ($addPhysicalController).hashCode());
        AddPhysicalDiffController $addPhysicalDiffController = this.getAddPhysicalDiffController();
        result = result * 59 + ($addPhysicalDiffController == null ? 43 : ($addPhysicalDiffController).hashCode());
        result = result * 59 + (this.isPhysicalView() ? 79 : 97);
        result = result * 59 + (this.isPhysicalDiffView() ? 79 : 97);
        return result;
    }

    public String toString() {
        return "PhysicalCountController(scrollPane=" + this.getScrollPane() + ", vBox=" + this.getVBox() + ", radioAll=" + this.getRadioAll() + ", allGspcDate=" + this.getAllGspcDate() + ", allPhysicalAdd=" + this.getAllPhysicalAdd() + ", allPhysicalApprove=" + this.getAllPhysicalApprove() + ", radioSingle=" + this.getRadioSingle() + ", singleGspcDate=" + this.getSingleGspcDate() + ", singlePhysicalAdd=" + this.getSinglePhysicalAdd() + ", singlePhysicalApprove=" + this.getSinglePhysicalApprove() + ", gspcTime=" + this.getGspcTime() + ", gspcProId=" + this.getGspcProId() + ", radioProId=" + this.getRadioProId() + ", radioProType=" + this.getRadioProType() + ", radioProLoaction=" + this.getRadioProLoaction() + ", gspgId=" + this.getGspgId() + ", gsplArea=" + this.getGsplArea() + ", gsplGroup=" + this.getGsplGroup() + ", gsplShelf=" + this.getGsplShelf() + ", gsplStorey=" + this.getGsplStorey() + ", gsplSeat=" + this.getGsplSeat() + ", saveDiffButton=" + this.getSaveDiffButton() + ", updateDiffButton=" + this.getUpdateDiffButton() + ", approveDiffButton=" + this.getApproveDiffButton() + ", addPhysicalController=" + this.getAddPhysicalController() + ", addPhysicalDiffController=" + this.getAddPhysicalDiffController() + ", physicalView=" + this.isPhysicalView() + ", physicalDiffView=" + this.isPhysicalDiffView() + ")";
    }
}

